package org.example.domain;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

public class ActivityRecord {

    private Integer id;
    private Integer userId;
    private Integer activityId;
    private Integer isDo;//是否到场签到
    private Integer status;
    private Integer isPunish;//如果该条记录为缺席，则该字段记录这次缺席是否已经被处罚了

    //以下为java实体类中特有属性，数据库中不存在
    private String name;//此次活动的名称
    private String tag;//此次活动的标签
    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date date;//活动举办的时间
    private String address;//活动举办的地点
    private User user;//活动的参与者

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getActivityId() {
        return activityId;
    }

    public void setActivityId(Integer activityId) {
        this.activityId = activityId;
    }

    public Integer getIsDo() {
        return isDo;
    }

    public void setIsDo(Integer isDo) {
        this.isDo = isDo;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Integer getIsPunish() {
        return isPunish;
    }

    public void setIsPunish(Integer isPunish) {
        this.isPunish = isPunish;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @Override
    public String toString() {
        return "ActivityRecord{" +
                "id=" + id +
                ", userId=" + userId +
                ", activityId=" + activityId +
                ", isDo=" + isDo +
                ", status=" + status +
                ", isPunish=" + isPunish +
                ", name='" + name + '\'' +
                ", date=" + date +
                ", address='" + address + '\'' +
                ", user=" + user +
                '}';
    }
}
